import { createAPI } from '../util';
import config from '../config';

const baseUrl = {
  mock: 'https://www.easy-mock.com/mock/5d6f5032fcfcf62cbb716373/example',
  dev: process.env.BASE_URL,
  pre: process.env.BASE_URL,
  prod: process.env.BASE_URL
}[config.env || 'mock'];

export default createAPI(baseUrl);
